package com.example.javaeekeshe.service.impl;

import com.example.javaeekeshe.mapper.AddressMapper;
import com.example.javaeekeshe.pojo.AddressBean;
import com.example.javaeekeshe.service.IAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements IAddressService {
    @Autowired
    AddressMapper addressMapper;

    @Override
    public List<AddressBean> selectByUId(Integer id) {
        return addressMapper.selectByUId(id);
    }

    @Override
    public void delAddressByid(Integer id) {
        addressMapper.delAddressByid(id);
    }

    @Override
    public void addAddress(AddressBean address) {
        addressMapper.addAddress(address);
    }

    @Override
    public AddressBean selectAddressByid(Integer id) {
        return addressMapper.selectAddressByid(id);
    }

    @Override
    public void update(AddressBean addressBean) {
        addressMapper.update(addressBean);
    }
}
